# !/usr/bin/env python
# -*- coding: utf-8 -*-
# ------------------------------
'''
await + [协程对象（xxx（）），task对象，future对象 ] 及IO阻塞等待对象
'''


# 导包
import asyncio

async def func():
    print('start')
    await asyncio.sleep(1)
    print('end')
    return '111'

async def main():
    response = await func()   # 当线程走到这里会等待协程func函数执行完内部函数才会解锁
    print('结束', response)

if __name__ == '__main__':
    asyncio.run(main())
